/*
Copyright 2009 Peter Krajnc, SCREENWORKER

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.screenworker.compactmvc.examples.flex.modules.dummymodule
{
	import com.screenworker.compactmvc.examples.flex.common.ApplicationConstants;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.CleanupCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.GetDescriptonCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.OpenDocumentsChangedCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.ReceiveMessageCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.RemotingResultCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.SendMessageCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller.ViewRegisterCommand;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.model.DummyModuleModel;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.model.RemotingModel;
	import com.screenworker.compactmvc.interfaces.IController;
	import com.screenworker.compactmvc.patterns.Controller;

	public class DummyModuleController extends Controller implements IController
	{
		public static const NAME:String = 'DummyModuleController';
		
		//notification identifier
		public static const CLEANUP:String 			= 'cleanup';
		public static const SEND_MESSAGE:String 	= 'sendMessage';
		public static const GET_DESCRIPTION:String	= 'getDescription';
		public static const REMOTING_RESULT:String	= 'remotingResult';
		
		public function DummyModuleController()
		{
			super(ApplicationConstants.MODULE_CONTROLLER);
		}
		
		override public function registerHandler():void
		{	
			registerModel(DummyModuleModel.NAME, DummyModuleModel);
			registerModel(RemotingModel.NAME, RemotingModel);
			
			registerCommand(VIEW_REGISTER, ViewRegisterCommand)
			registerCommand(SEND_MESSAGE, SendMessageCommand);
			registerCommand(ApplicationConstants.SEND_CLEANUP_TO_MODULE, CleanupCommand);
			registerCommand(ApplicationConstants.SEND_MESSAGE_TO_MODULE, ReceiveMessageCommand);
			registerCommand(ApplicationConstants.SEND_OPEN_DOCUMENTS_TO_MODULE, OpenDocumentsChangedCommand);
			registerCommand(GET_DESCRIPTION, GetDescriptonCommand);
			registerCommand(REMOTING_RESULT, RemotingResultCommand);
		}
	}
}
